<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SQL Expressions</title>
<link type="text/css" href="../../skin/page.css" rel="stylesheet">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<!--================= start Navigation Path ==================-->
<table summary="navigation path" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td nowrap="nowrap" valign="middle" bgcolor="#CFDCED" height="20"><img height="1" width="5" alt="" src="../../skin/images/spacer.gif" class="spacer"><!--===== breadcrumb trail (javascript-generated) ====--><font size="2" face="Arial, Helvetica, Sans-serif"><script src="../../skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script></font></td>
</tr>
<tr>
<td bgcolor="#4C6C8F" height="2"><img height="2" width="2" alt="" src="../../skin/images/spacer.gif" class="spacer"></td>
</tr>
</table>
<!--================= end Navigation Path ==================-->
<!--================= start Banner ==================-->
<table summary="header with logos" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<!--================= start Group Logo ==================-->
<td bgcolor="#294563"><a href="http://incubator.apache.org"><img border="0" class="logoImage" alt="" src="../../resources/images/apache-incubator.png" title="Derby is a zero admin java based embedded database."></a></td>
<!--================= end Group Logo ==================-->
<!--================= start Project Logo ==================--><td width="100%" align="center" bgcolor="#294563"><a href="http://incubator.apache.org/derby/"><img border="0" class="logoImage" alt="Derby" src="../../images/derby-logo.jpg" title="Derby is a zero admin java based embedded database."></a></td>
<!--================= end Project Logo ==================-->
<!--================= start Search ==================--><td valign="top" rowspan="2" bgcolor="#294563">
<form target="_blank" action="http://www.google.com/search" method="get">
<table summary="search" border="0" cellspacing="0" cellpadding="0" bgcolor="#4C6C8F">
<tr>
<td colspan="3"><img height="10" width="1" alt="" src="../../skin/images/spacer.gif" class="spacer"></td>
</tr>
<tr>
<td><img height="1" width="1" alt="" src="../../skin/images/spacer.gif" class="spacer"></td><td nowrap="nowrap"><input value="incubator.apache.org" name="sitesearch" type="hidden"><input size="15" name="q" id="query" type="text"><img height="1" width="5" alt="" src="../../skin/images/spacer.gif" class="spacer"><input name="Search" value="Search" type="submit">
<br>
<font face="Arial, Helvetica, Sans-serif" size="2" color="white">
                      the Derby site
                      
                      
                    </font></td><td><img height="1" width="1" alt="" src="../../skin/images/spacer.gif" class="spacer"></td>
</tr>
<tr>
<td><img alt="" border="0" height="10" width="9" src="../../skin/images/search-left.gif"></td><td><img height="1" width="1" alt="" src="../../skin/images/spacer.gif" class="spacer"></td><td><img alt="" border="0" height="10" width="9" src="../../skin/images/search-right.gif"></td>
</tr>
</table>
</form>
</td>
<!--================= start Search ==================--><td bgcolor="#294563"><img height="10" width="10" alt="" src="../../skin/images/spacer.gif" class="spacer"></td>
</tr>
<tr>
<td valign="bottom" bgcolor="#294563" colspan="2">
<!--================= start Tabs ==================-->
<div class="tab">
<table summary="tab bar" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="6"><img alt="" height="8" width="6" src="../../skin/images/spacer.gif"></td><td valign="bottom">
<table summary="non selected tab" style="height: 1.6em" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" width="5" bgcolor="#B2C4E0"><img height="5" width="5" alt="" src="../../skin/images/tab-left.gif"></td><td valign="middle" bgcolor="#B2C4E0"><a class="base-not-selected" href="../../index.html">Home</a></td><td valign="top" width="5" bgcolor="#B2C4E0"><img height="5" width="5" alt="" src="../../skin/images/tab-right.gif"></td>
</tr>
<tr>
<td colspan="3" height="1"></td>
</tr>
</table>
</td><td width="6"><img alt="" height="8" width="6" src="../../skin/images/spacer.gif"></td><td valign="bottom">
<table summary="selected tab" style="height: 1.8em" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" width="5" bgcolor="#4C6C8F"><img height="5" width="5" alt="" src="../../skin/images/tabSel-left.gif"></td><td valign="middle" bgcolor="#4C6C8F"><font color="#ffffff" size="2" face="Arial, Helvetica, Sans-serif"><b><a class="base-selected" href="../../manuals/index.html">Manuals</a></b></font></td><td valign="top" width="5" bgcolor="#4C6C8F"><img height="5" width="5" alt="" src="../../skin/images/tabSel-right.gif"></td>
</tr>
</table>
</td><td width="6"><img alt="" height="8" width="6" src="../../skin/images/spacer.gif"></td><td valign="bottom">
<table summary="non selected tab" style="height: 1.6em" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" width="5" bgcolor="#B2C4E0"><img height="5" width="5" alt="" src="../../skin/images/tab-left.gif"></td><td valign="middle" bgcolor="#B2C4E0"><a class="base-not-selected" href="../../papers/index.html">Papers</a></td><td valign="top" width="5" bgcolor="#B2C4E0"><img height="5" width="5" alt="" src="../../skin/images/tab-right.gif"></td>
</tr>
<tr>
<td colspan="3" height="1"></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<!--================= end Tabs ==================-->
</td><td bgcolor="#294563"><img alt="" width="1" height="1" src="../../skin/images/spacer.gif" class="spacer"></td>
</tr>
<tr>
<td bgcolor="#4C6C8F" colspan="4"><img width="1" height="10" alt="" src="../../skin/images/spacer.gif" class="spacer"></td>
</tr>
</table>
<!--================= end Banner ==================-->
<!--================= start Menu, NavBar, Content ==================-->
<table summary="page content" bgcolor="#ffffff" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top">
<table summary="menu" border="0" cellspacing="0" cellpadding="0">
<tr>
<!--================= start left top NavBar ==================-->
<td rowspan="3" valign="top">
<table summary="blue line" border="0" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#294563"><img width="10" height="1" alt="" src="../../skin/images/spacer.gif" class="spacer"></td>
</tr>
<tr>
<td bgcolor="#CFDCED"><font color="#4C6C8F" size="4" face="Arial, Helvetica, Sans-serif">&nbsp;</font></td>
</tr>
<tr>
<td bgcolor="#294563"><img width="10" height="1" alt="" src="../../skin/images/spacer.gif" class="spacer"></td>
</tr>
</table>
</td>
<!--================= end left top NavBar ==================--><td bgcolor="#294563"><img width="1" height="1" alt="" src="../../skin/images/spacer.gif" class="spacer"></td><td valign="bottom" bgcolor="#4C6C8F"><img width="10" height="10" alt="" src="../../skin/images/spacer.gif" class="spacer"></td><td nowrap="nowrap" valign="top" bgcolor="#4C6C8F">
<!--================= start Menu items ==================-->
<div class="menu">
<ul>
<li>
<font color="#CFDCED">Manuals</font>
<ul>
     
<li>
<a href="../../manuals/index.html">About</a>
</li>
     
<li>
<font color="#CFDCED">Getting Started</font>
<ul>
         
<li>
<a href="../../manuals/getstart/gspr02.html" title="Table of Contents">Table of Contents</a>
</li>
         
<li>
<a href="../../manuals/getstart/gspr40.html" title="Index">Index</a>
</li>
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
     
</ul>
</li>
     
<li>
<font color="#CFDCED">Reference Manual</font>
<ul>
         
<li>
<a href="../../manuals/reference/sqlj02.html" title="Table of Contents">Table of Contents</a>
</li>
         
<li>
<a href="../../manuals/reference/sqlj275.html" title="Index">Index</a>
</li>
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
     
</ul>
</li>

     
<li>
<font color="#CFDCED">Developer's Guide</font>
<ul>
         
<li>
<a href="../../manuals/develop/develop02.html" title="Table of Contents">Table of Contents</a>
</li>
         
<li>
<a href="../../manuals/develop/develop157.html" title="Index">Index</a>
</li>
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
     
</ul>
</li>
     
<li>
<font color="#CFDCED">Tuning Derby</font>
<ul>
         
<li>
<a href="../../manuals/tuning/perf02.html" title="Table of Contents">Table of Contents</a>
</li>
         
<li>
<a href="../../manuals/tuning/perf121.html" title="Index">Index</a>
</li>
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
     
</ul>
</li>

     
<li>
<font color="#CFDCED">Server &amp; Admin Guide</font>
<ul>
         
<li>
<a href="../../manuals/admin/hubprnt02.html" title="Table of Contents">Table of Contents</a>
</li>
         
<li>
<a href="../../manuals/admin/hubprnt65.html" title="Index">Index</a>
</li>
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
        
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
    
</ul>
</li>

    
<li>
<font color="#CFDCED">Tools &amp; Utility Guide</font>
<ul>
         
<li>
<a href="../../manuals/tools/tools02.html" title="Table of Contents">Table of Contents</a>
</li>
         
<li>
<a href="../../manuals/tools/tools113.html" title="Index">Index</a>
</li>
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
    
</ul>
</li>
  
</ul>
</li>
</ul>
</div>
<!--================= end Menu items ==================-->
</td><td valign="bottom" bgcolor="#4C6C8F"><img width="10" height="10" alt="" src="../../skin/images/spacer.gif" class="spacer"></td><td bgcolor="#294563"><img width="1" height="1" alt="" src="../../skin/images/spacer.gif" class="spacer"></td>
</tr>
<tr>
<td valign="bottom" align="left" colspan="2" rowspan="2" bgcolor="#4C6C8F"><img height="10" width="10" border="0" alt="" src="../../skin/images/menu-left.gif"></td><td bgcolor="#4C6C8F"><img height="10" width="10" alt="" src="../../skin/images/spacer.gif" class="spacer"></td><td valign="bottom" align="right" colspan="2" rowspan="2" bgcolor="#4C6C8F"><img height="10" width="10" border="0" alt="" src="../../skin/images/menu-right.gif"></td>
</tr>
<tr>
<td height="1" bgcolor="#294563"><img width="1" height="1" alt="" src="../../skin/images/spacer.gif" class="spacer"></td>
</tr>
</table>
</td><td valign="top" width="100%">
<table summary="content" width="100%" border="0" cellpadding="0" cellspacing="0">
<!--================= start middle NavBar ==================-->
<tr>
<td colspan="4" bgcolor="#294563"><img width="10" height="1" alt="" src="../../skin/images/spacer.gif" class="spacer"></td>
</tr>
<tr>
<td align="left" width="10" bgcolor="#CFDCED"><img width="10" height="1" alt="" src="../../skin/images/spacer.gif" class="spacer"></td><td align="left" width="50%" bgcolor="#CFDCED"><font color="#4C6C8F" size="3" face="Arial, Helvetica, Sans-serif">
                &nbsp;
                
                </font><img width="10" height="8" alt="" src="../../skin/images/spacer.gif" class="spacer"></td><td align="right" width="50%" bgcolor="#CFDCED"><font color="#4C6C8F" size="3" face="Arial, Helvetica, Sans-serif">
                &nbsp;
                
                </font><img width="10" height="8" alt="" src="../../skin/images/spacer.gif" class="spacer"></td><td width="10" bgcolor="#CFDCED"><img width="10" height="1" alt="" src="../../skin/images/spacer.gif" class="spacer"></td>
</tr>
<tr>
<td colspan="4" bgcolor="#294563"><img width="10" height="1" alt="" src="../../skin/images/spacer.gif" class="spacer"></td>
</tr>
<!--================= end middle NavBar ==================-->
<!--================= start Content==================-->
<tr>
<td align="left" width="10"><img width="10" height="1" alt="" src="../../skin/images/spacer.gif" class="spacer"></td><td colspan="2" align="left" width="100%">
<div class="content">
<table class="title" summary="">
<tr>
<td valign="middle">
<h1>SQL Expressions</h1>
</td>
</tr>
</table>
<ul class="minitoc">
<li>
<a href="#SQL+Expressions">SQL Expressions</a>
</li>
</ul>
<a name="N10043"></a><a name="SQL+Expressions"></a>
<h3>SQL Expressions</h3>
<div style="margin-left: 0 ; border: 2px">
<p>Syntax for many statements and expressions includes the term <em>Expression</em>, or a term for a specific kind of expression such as <em>TableSubquery</em>. Expressions are allowed in these specified places within statements. Some locations allow only a specific type of expression or one with a specific property. <a href="#TBLSII-SQLJ-18370">Table 7</a>, lists all the possible SQL expressions and indicates where they are allowed.</p>
<p>If not otherwise specified, an expression is permitted anywhere the word <em>Expression</em> appears in the syntax. This includes:</p>
<ul>
<li>
<em>SelectExpression</em>
</li>
<li>
<a href="sqlj52.html#HDRSII-SQLJ-26498">UPDATE statement</a> (SET portion)</li>
<li>
<a href="sqlj53.html#HDRSII-SQLJ-11277">VALUES expression</a>
</li>
<li>
<a href="sqlj54.html#HDRSII-SQLJ-33602">WHERE clause</a>
</li>
</ul>
<p>Of course, many other statements include these elements as building blocks, and so allow expressions as part of these elements.<br>
</p>
<p>
<strong>Table 7. Table of Expressions</strong>
<br>
</p>
<table class="ForrestTable" cellspacing="1" cellpadding="4">
<tr>
<th><a name="WQ76"></a>
<br>
</th><th><a name="WQ77"></a>Expression Type</th><th><a name="WQ78"></a>Explanation</th>
</tr>
<tr>
<td colspan="2" headers="WQ76 WQ77" width="48%"><em>General expressions</em> </td><td headers="WQ78" width="52%">All expressions that might result in a value of any type.</td>
</tr>
<tr>
<td headers="WQ76" width="5%">
<br>
</td><td headers="WQ77" width="43%">
<p>
<a name="IDX1016"></a> Column reference</p>
<p>Allowed in <em>SelectExpressions</em>, UPDATE statements, and the WHERE clauses of data manipulation statements.<br>
</p>
</td><td headers="WQ78" width="52%">A <em>column-Name</em> that references the value of the column made visible to the expression containing the Column reference. <p>You must qualify the <em>column-Name</em> by the table name or correlation name if it is ambiguous.</p>
<p>The qualifier of a <em>column-Name</em> must be the correlation name, if a correlation name is given to a table that is in a <a href="sqlj36.html#HDRSII-SQLJ-21583">FROM clause</a>. The table name is no longer visible as a <em>column-Name</em> qualifier once it has been aliased by a correlation name.</p>
</td>
</tr>
<tr>
<td headers="WQ76" width="5%">
<br>
</td><td headers="WQ77" width="43%">
<p>
<a name="IDX1017"></a> Constant<br>
</p>
</td><td headers="WQ78" width="52%">Most built-in data types typically have constants associated with them (as shown in <a href="sqlj122.html#HDRSII-SQLJ-31068">Data Types</a>).</td>
</tr>
<tr>
<td headers="WQ76" width="5%">
<br>
</td><td headers="WQ77" width="43%">
<p>
<a name="IDX1018"></a> NULL</p>
<p>Allowed in CAST expressions or in INSERT VALUES lists and UPDATE SET clauses. Using it in a CAST expression gives it a specific data type.<br>
</p>
</td><td headers="WQ78" width="52%">NULL is an untyped constant representing the unknown value.</td>
</tr>
<tr>
<td headers="WQ76" width="5%">
<br>
</td><td headers="WQ77" width="43%">
<p>
<a name="IDX1019"></a> Dynamic parameter</p>
<p>Allowed anywhere in an expression where the data type can be easily deduced. See <a href="sqlj149.html#HDRSII-SQLJ-29911">Dynamic Parameters</a>.<br>
</p>
</td><td headers="WQ78" width="52%">A dynamic parameter is a parameter to an SQL statement for which the value is not specified when the statement is created. Instead, the statement has a question mark (?) as a placeholder for each dynamic parameter. See <a href="sqlj149.html#HDRSII-SQLJ-29911">Dynamic Parameters</a>. <p>Dynamic parameters are permitted only in prepared statements. You must specify values for them before the prepared statement is executed. The values specified must match the types expected.</p>
</td>
</tr>
<tr>
<td headers="WQ76" width="5%">
<br>
</td><td headers="WQ77" width="43%">
<p>
<a name="IDX1020"></a> CAST expression<br>
</p>
</td><td headers="WQ78" width="52%">Lets you specify the type of NULL or of a dynamic parameter or convert a value to another type. See <a href="sqlj62.html#HDRSII-SQLJ-33562">CAST</a>.</td>
</tr>
<tr>
<td headers="WQ76" width="5%">
<br>
</td><td headers="WQ77" width="43%">
<p>
<a name="IDX1021"></a> scalar subquery<br>
</p>
</td><td headers="WQ78" width="52%">Subquery that returns a single row with a single column. See <em>ScalarSubquery.</em> </td>
</tr>
<tr>
<td headers="WQ76" width="5%">
<br>
</td><td headers="WQ77" width="43%">
<p>
<a name="IDX1022"></a> table subquery</p>
<p>Allowed as a tableExpression in a FROM clause and with EXISTS, IN, and quantified comparisons.<br>
</p>
</td><td headers="WQ78" width="52%">Subquery that returns more than one column and more than one row. See <em>TableSubquery.</em> </td>
</tr>
<tr>
<td headers="WQ76" width="5%">
<br>
</td><td headers="WQ77" width="43%">
<p>
<a name="IDX1023"></a> Conditional expression<br>
</p>
</td><td headers="WQ78" width="52%">A conditional expression chooses an expression to evaluate based on a boolean test.</td>
</tr>
<tr>
<td colspan="2" headers="WQ76 WQ77" width="48%"><em>Boolean expressions</em> </td><td headers="WQ78" width="52%">Expressions that result in boolean values. Most general expressions can result in boolean values. <p>Boolean expressions commonly used in a WHERE clause are made of operands operated on by SQL operators. See <a href="sqlj148.html#TBLSII-SQLJ-34517">Table 8</a>.</p>
</td>
</tr>
<tr>
<td colspan="2" headers="WQ76 WQ77" width="48%"><em> Numeric expressions</em> 
<br>
</td><td headers="WQ78" width="52%">Expressions that result in numeric values. Most of the general expressions can result in numeric values. <p>Numeric values have one of the following types:</p>
<p>SMALLINT, INTEGER, BIGINT, REAL, DOUBLE PRECISION, DECIMAL.</p>
</td>
</tr>
<tr>
<td headers="WQ76" width="5%">
<br>
</td><td headers="WQ77" width="43%">
<p>
<a name="IDX1025"></a> +, -, *, /, unary + and - expressions<br>
</p>
</td><td headers="WQ78" width="52%">+, -, *, /, unary + and - <p>Evaluate the expected math operation on the operands. If both operands are the same type, the result type is not promoted, so the division operator on integers results in an integer that is the truncation of the actual numeric result. When types are mixed, they are promoted as described in <a href="sqlj122.html#HDRSII-SQLJ-31068">Data Types</a>.</p>
<p>Unary + is a noop (i.e., +4 is the same as 4). Unary - is the same as multiplying the value by -1, effectively changing its sign.</p>
</td>
</tr>
<tr>
<td headers="WQ76" width="5%">
<br>
</td><td headers="WQ77" width="43%">
<p>AVG<br>
</p>
</td><td headers="WQ78" width="52%">Returns the average of a set of numeric values. <a href="sqlj60.html#HDRSII-SQLJ-32693">AVG</a> </td>
</tr>
<tr>
<td headers="WQ76" width="5%">
<br>
</td><td headers="WQ77" width="43%">
<p>SUM<br>
</p>
</td><td headers="WQ78" width="52%">Returns the sum of a set of numeric values. <a href="sqlj98.html#HDRSII-SQLJ-13083">SUM</a> </td>
</tr>
<tr>
<td headers="WQ76" width="5%">
<br>
</td><td headers="WQ77" width="43%">
<p>
<a name="IDX1026"></a> LENGTH<br>
</p>
</td><td headers="WQ78" width="52%">Returns the number of characters in a character or bit string. See <a href="sqlj64.html#HDRSII-SQLJ-16762">LENGTH</a>.</td>
</tr>
<tr>
<td headers="WQ76" width="5%">
<br>
</td><td headers="WQ77" width="43%">
<p>LOWER<br>
</p>
</td><td headers="WQ78" width="52%">See <a href="sqlj85.html#HDRSII-SQLJ-42049">LCASE or LOWER</a>.</td>
</tr>
<tr>
<td headers="WQ76" width="5%">
<br>
</td><td headers="WQ77" width="43%">
<p>COUNT<br>
</p>
</td><td headers="WQ78" width="52%">Returns the count of a set of values. See <a href="sqlj67.html#HDRSII-SQLJ-38716">COUNT</a>, <a href="sqlj68.html#HDRSII-SQLJ-66113">COUNT(*)</a>.</td>
</tr>
<tr>
<td colspan="2" headers="WQ76 WQ77" width="48%"><em> Character expressions</em> 
<br>
</td><td headers="WQ78" width="52%">Expressions that result in a CHAR or VARCHAR value. Most general expressions can result in a CHAR or VARCHAR value.</td>
</tr>
<tr>
<td headers="WQ76" width="5%">
<br>
</td><td headers="WQ77" width="43%">
<p>
<a name="IDX1028"></a> A CHAR or VARCHAR value that uses wildcards.</p>
<p>Used in a LIKE pattern.<br>
</p>
</td><td headers="WQ78" width="52%">The wildcards % and _ make a character string a pattern against which the LIKE operator can look for a match. <p>See <a href="sqlj148.html#SPTSII-SQLJ-15383">LIKE</a>.</p>
</td>
</tr>
<tr>
<td headers="WQ76" width="5%">
<br>
</td><td headers="WQ77" width="43%">
<p>
<a name="IDX1029"></a> Concatenation expression<br>
</p>
</td><td headers="WQ78" width="52%">In a concatenation expression, the concatenation operator, "||", concatenates its right operand to the end of its left operand. Operates on character and bit strings. See <a href="sqlj65.html#HDRSII-SQLJ-40899">Concatenation</a>.</td>
</tr>
<tr>
<td headers="WQ76" width="5%">
<br>
</td><td headers="WQ77" width="43%">
<p>Built-in string functions<br>
</p>
</td><td headers="WQ78" width="52%">The built-in string functions act on a String and return a string. See <a href="sqlj86.html#HDRSII-SQLJ-97870">LTRIM</a>, <a href="sqlj85.html#HDRSII-SQLJ-42049">LCASE or LOWER</a>, <a href="sqlj92.html#HDRSII-SQLJ-32613">RTRIM</a>, <a href="sqlj97.html#HDRSII-SQLJ-93082">SUBSTR</a>, and <a href="sqlj101.html#HDRSII-SQLJ-29930">UCASE or UPPER</a> </td>
</tr>
<tr>
<td headers="WQ76" width="5%">
<br>
</td><td headers="WQ77" width="43%">
<p>USER functions<br>
</p>
</td><td headers="WQ78" width="52%">User functions return information about the current user as a String. See <a href="sqlj77.html#HDRSII-SQLJ-42324">CURRENT_USER</a>, <a href="sqlj94.html#HDRSII-SQLJ-25228">SESSION_USER</a>, and <a href="sqlj102.html#HDRSII-SQLJ-42476">USER</a> </td>
</tr>
<tr>
<td colspan="2" headers="WQ76 WQ77" width="48%"><em> Date/time expressions</em> 
<br>
</td><td headers="WQ78" width="52%">A date/time expression results in a DATE, TIME, or TIMESTAMP value. Most of the general expressions can result in a date/time value.</td>
</tr>
<tr>
<td headers="WQ76" width="5%">
<br>
</td><td headers="WQ77" width="43%">
<p>
<a name="IDX1031"></a> CURRENT_DATE<br>
</p>
</td><td headers="WQ78" width="52%">Returns the current date. See <a href="sqlj70.html#HDRSII-SQLJ-34177">CURRENT_DATE</a>.</td>
</tr>
<tr>
<td headers="WQ76" width="5%">
<br>
</td><td headers="WQ77" width="43%">
<p>
<a name="IDX1032"></a> CURRENT_TIME<br>
</p>
</td><td headers="WQ78" width="52%">Returns the current time. See <a href="sqlj74.html#HDRSII-SQLJ-33772">CURRENT_TIME</a>.</td>
</tr>
<tr>
<td headers="WQ76" width="5%">
<br>
</td><td headers="WQ77" width="43%">
<p>
<a name="IDX1033"></a> CURRENT_TIMESTAMP<br>
</p>
</td><td headers="WQ78" width="52%">Returns the current timestamp. See <a href="sqlj76.html#HDRSII-SQLJ-15866">CURRENT_TIMESTAMP</a>.</td>
</tr>
</table>
<hr>
<a href="sqlj145.html">Previous Page</a>
<br>
<a href="sqlj147.html">Next Page</a>
<br>
<a href="sqlj02.html#ToC">Table of Contents</a>
<br>
<a href="sqlj275.html#HDRINDEX_START">Index</a>
</div>
<div class="attribution"></div>
</div>
</td><td width="10"><img width="10" height="1" alt="" src="../../skin/images/spacer.gif" class="spacer"></td>
</tr>
<!--================= end Content==================-->
</table>
</td>
</tr>
</table>
<!--================= end Menu, NavBar, Content ==================-->
<!--================= start Footer ==================-->
<table summary="footer" cellspacing="0" cellpadding="0" width="100%" border="0">
<tr>
<td colspan="2" height="1" bgcolor="#4C6C8F"><img height="1" width="1" alt="" src="../../skin/images/spacer.gif" class="spacer"><a href="../../skin/images/label.gif"></a><a href="../../skin/images/page.gif"></a><a href="../../skin/images/chapter.gif"></a><a href="../../skin/images/chapter_open.gif"></a><a href="../../skin/images/current.gif"></a><a href="/favicon.ico"></a></td>
</tr>
<tr>
<td colspan="2" bgcolor="#CFDCED" class="copyright" align="center"><font size="2" face="Arial, Helvetica, Sans-Serif">Copyright &copy;
          2004&nbsp;Apache Software Foundation All rights reserved.<script type="text/javascript" language="JavaScript"><!--
              document.write(" - "+"Last Published: " + document.lastModified);
            //  --></script></font></td>
</tr>
<tr>
<td colspan="2" align="left" bgcolor="#CFDCED" class="logos"></td>
</tr>
</table>
<!--================= end Footer ==================-->
</body>
</html>
